package com.fenghuajueli.libbasecoreui.entity;

import java.util.List;

public class MenuEntity {

    private String name;
    private int resIcon;
    private List<MenuEntity> childMenuList;


    /**
     * 第三级菜单
     */
    private List<MenuEntity> thirdMenuList;


    /**
     * 当前按钮是否可用，默认都是可用的
     */
    private boolean isAvailable = true;


    public MenuEntity(String name, int resIcon) {
        this.name = name;
        this.resIcon = resIcon;
    }

    public MenuEntity(String name, int resIcon, List<MenuEntity> childMenuList) {
        this.name = name;
        this.resIcon = resIcon;
        this.childMenuList = childMenuList;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getResIcon() {
        return resIcon;
    }

    public void setResIcon(int resIcon) {
        this.resIcon = resIcon;
    }

    public List<MenuEntity> getChildMenuList() {
        return childMenuList;
    }

    public void setChildMenuList(List<MenuEntity> childMenuList) {
        this.childMenuList = childMenuList;
    }

    public boolean isAvailable() {
        return isAvailable;
    }

    public void setAvailable(boolean available) {
        isAvailable = available;
    }

    public List<MenuEntity> getThirdMenuList() {
        return thirdMenuList;
    }

    public void setThirdMenuList(List<MenuEntity> thirdMenuList) {
        this.thirdMenuList = thirdMenuList;
    }

    public boolean hasThirdMenu() {
        if (thirdMenuList == null) {
            return false;
        } else {
            return thirdMenuList.size() > 0;
        }
    }

}
